<template>
  <div class="panel-list">
    <ul class="type-list">
      <li v-for="(item, index) in searchType" :key="index">
        <img :src="`/search_${item.img}`" />
        <span>{{ item.name }}</span>
      </li>
    </ul>
    <el-divider border-style="dashed" />
    <ul class="history-list">
      <el-scrollbar>
        <li v-for="(item, index) in historyList" :key="index">
          <div class="text">
            <i :class="['iconfont', `icon-${item.icon}`]"></i>
            <span>{{ item.name }}</span>
          </div>
          <div class="delete">
            <i class="iconfont icon-delete"></i>
          </div>
        </li>
      </el-scrollbar>
    </ul>
    <div class="bottom-logo">
      <div class="content">
        <img src="/app_download_card_bg.png" alt="" />
        <button>去官网下载</button>
      </div>
      <div class="qrcode">
        <img src="/bannerQrcode-1.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script setup>
const searchType = [
  { type: 'food', name: '美食', img: 'food.png' },
  { type: 'hotel', name: '酒店', img: 'hotel.png' },
  { type: 'view', name: '景点', img: 'view.png' },
  { type: 'house', name: '小区', img: 'house.png' },
]

const historyList = [
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
  { icon: 'zuijinliulan', name: '历史记录', coordinate: [] },
]
</script>

<style scoped>
.panel-list {
  position: absolute;
  width: 360px;
  height: 450px;
  top: 46px;
  left: 0px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
  background: #fff;
  border-radius: 3px;
  .type-list {
    display: flex;
    justify-content: space-around;
    padding: 20px 20px 0 20px;
    li {
      display: flex;
      flex-direction: column;
      justify-content: center;
      img {
        width: 46px;
        height: 46px;
      }
      span {
        text-align: center;
        margin-top: 10px;
        color: #555;
        font-size: 14px;
      }
    }
  }
  .history-list {
    width: 360px;
    height: 180px;
    overflow: auto;
    li {
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      color: #aaa;
      font-size: 14px;
      padding: 0px 20px;
      height: 30px;
      i {
        font-size: 13px;
        margin-right: 10px;
        line-height: 30px;
      }
      span {
        line-height: 30px;
      }
      .delete i {
        font-size: 16px;
        color: #fff;
      }
      &:hover {
        background: #fbfbfb;
        .delete i {
          color: #aaa;
          &:hover {
            color: #666;
          }
        }
      }
    }
  }
  .bottom-logo {
    position: absolute;
    bottom: 0;
    width: 360px;
    height: 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f6f7f8;
    .content {
      display: flex;
      flex-direction: column;
      gap: 10px;
      img {
        width: 124px;
        height: 44px;
      }
      button {
        padding: 8px 32px;
        border: none;
        border-radius: 20px;
        color: #fff;
        background: linear-gradient(90deg, #1a66ff, #1a8cff);
      }
    }
    .qrcode {
      img {
        width: 88px;
      }
    }
  }
}
</style>
